const KoaRouter = require("@koa/router")
const userController = require("../controller/user.controller")
const { verifyUser, handlePassword } = require("../middleware/user.middleware")

// 1.创建用户路由
const userRouter = new KoaRouter({ prefix: "/users" })

// 2.路由映射
// 2.1.用户注册接口
userRouter.post("/", verifyUser, handlePassword, userController.create)

// 3.导出路由
module.exports = userRouter
